import { IFeidaoAiMobile } from '@dfeidao/atom-mobile/interfaces';
import set from '@dfeidao/atom-mobile/local/set';
import nodejs from '@dfeidao/atom-mobile/msg/nodejs';
import render from '@dfeidao/atom-mobile/render/render';
import whoami from '../atom/whoami_getparams';
export default async function a001(fd: IFeidaoAiMobile) {
	const users = await whoami(fd) as { userinfo: { productid: string; }, params: { teacher_no: string; } };
	const productid = users.userinfo.productid;
	const teacher_no = users.params.teacher_no;
	set(fd, 'productid', productid);
	set(fd, 'teacher_no', teacher_no);
	const res = await nodejs<{ dest: Array<{}> }>('app-my-schedule/s001', { productid, teacher_no });
	render(fd, { data: res.dest, chek: '1' });
}
